extends Node2D

@onready var dialog: Node2D = $camera/dialog
@onready var interact: Control = $interact
@onready var camera: Node2D = $camera
@onready var bgm: AudioStreamPlayer2D = $bgm

func _enter(new_camera):
	self.visible=true
	camera=new_camera
	bgm.playing=true
	self.add_child(camera)

func _exit():
	self.visible=false
	bgm.playing=false
	self.remove_child(camera)
	return camera

func _physics_process(delta: float) -> void:
	if not bgm.playing:
		bgm.play()
